import axios from 'axios'
import { userStore } from '@/stores/user.js'
const store = userStore()
const token = store.userInfo.token

export const getUserInfo = () =>
  axios.get(`http://localhost/hu/public/user?loginname=${token}`)

export const updateUserInfo = (data) =>
  axios.post(`http://localhost/hu/public/user`, data)

export const togPassword = (data) =>
  axios.post(`http://localhost/hu/public/reset`, data)
